home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 6 / MacMania 6.toast / / Multimedia & Desktop / sk8 / SK8InJava / Concentration / Java Code / board.java next >
Encoding:
Java Source  |  1997-02-27  |  1.5 KB  |  62 lines  |  [TEXT/SK8 ]

  1. /*  SK8 © 1997 Apple Computer, Inc.
  2.     This code is protected under the current SK8 License
  3.     See http://sk8.research.apple.com/ for more information
  4.     Apple Research Laboratories
  5. */
  6.  
  7.  
  8.  
  9. import java.awt.*;
  10.  
  11.  
  12. public class board extends rectangle {
  13.     
  14.     //----------------------------------------
  15.     //Property Definitions:
  16.     //----------------------------------------
  17.     
  18.     //The currentplayer Property:
  19.     protected player fCurrentplayer = null;
  20.     public player currentplayer () {
  21.         return fCurrentplayer;
  22.     }
  23.     /*   Do the actual property access:
  24.     */
  25.     public Object setcurrentplayer ( player newvalue ) {
  26.         if (this.currentplayer() != null) { 
  27.             actor curlabel = this.currentplayer().scorelabel();
  28.             curlabel.setfillcolor(curlabel.container().fillcolor());
  29.             curlabel.settextcolor(sk8.black);
  30.         }
  31.         fCurrentplayer = newvalue;
  32.         newvalue.scorelabel().setfillcolor(sk8.black);
  33.         newvalue.scorelabel().settextcolor(sk8.white);
  34.         return null;
  35.     }
  36.     
  37.     
  38.     //----------------------------------------
  39.     //Handler Definitions:
  40.     //----------------------------------------
  41.     
  42.     //Initialization function
  43.     public board() {
  44.         super();
  45.         actor currentContent;
  46.         currentContent = new newgamebutton();
  47.         currentContent.setcontainer(this);
  48.         this.settext("SK8 Concentration");
  49.         this.settextfont("Times");
  50.         this.settextsize(36);
  51.         this.settextlocation(sk8.quote("TOPCENTER"));
  52.     }
  53.     /*   SK8 Concentration: a SK8Script version for translation to Java.
  54.     */
  55.     public Object mousedown (  ) {
  56.         if (this == sk8.eventactor()) this.drag(/* IGNORED KEY: LIVE true */);
  57.         return null;
  58.     }
  59.     
  60.     
  61. }
  62.